package com.ruoyi.book.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 书本信息对象 bs_book
 * 
 * @author ruoyi
 * @date 2024-04-02
 */
@Setter
@Getter
public class Book extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 图片 */
    @Excel(name = "图片")
    private String pic;

    /** 编号 */
    @Excel(name = "编号")
    private String num;

    /** 书名 */
    @Excel(name = "书名")
    private String name;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 出版社 */
    @Excel(name = "出版社")
    private String publisher;

    /** 出版时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出版时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publicationDate;

    /** 位置 */
    @Excel(name = "位置")
    private String location;

    /** 类型 */
    @Excel(name = "类型")
    private String type;

    /** 状态 */
    @Excel(name = "状态")
    private String state;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    /** 删除标志 */
    private String delFlag;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pic", getPic())
            .append("num", getNum())
            .append("name", getName())
            .append("author", getAuthor())
            .append("publisher", getPublisher())
            .append("publicationDate", getPublicationDate())
            .append("location", getLocation())
            .append("type", getType())
            .append("state", getState())
            .append("description", getDescription())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}
